This folder contains all needed data and R code to replicate Figures 1-4 and
the underlying estimates used to produce them. Be sure to set the working directory
to this directory at the top of the R script and to have all needed packages installed.
All analysis and visualizations are contained in "arps_replication.R".
To guarantee that the code runs smoothly, PLEASE DOWNLOAD ALL FILES IN THEIR ORIGINAL
FILE FORMATS AND INTO THE SAME DIRECTORY AS THE "arps_replication.R".

The RDReplication.dta is the data used by Caughey and Sekhon, while the 
statewide_analysis_rep.RData file is that used by Hainmueller et al. The 
var_correspondence.csv file is used to determine the type of variable for 
the covariates in the Caughey and Sekhon dataset, while the state_names.csv
and state_merge.csv are used to merge the normal vote estimates from Hainmueller et al
with the Caughey and Sekhon data in order to build a similar control set
for Congressional elections. 

All estimates are outputted as tables in the directory, along with the requisite 
figures. The code is organized by figure, with any analysis needed for the figure 
included first with visualization code second. Code is ordered by figure number. 

Note that all non-binary estimates used in Figure 2 are standardized. 